/*
 * File: mean.c
 *
 * MATLAB Coder version            : 24.2
 * C/C++ source code generated on  : 2025-05-29 15:13:57
 */

/* Include Files */
#include "mean.h"
#include "rt_nonfinite.h"

/* Function Definitions */
/*
 * Arguments    : const double x[102400]
 * Return Type  : double
 */
double mean(const double x[102400])
{
  double accumulatedData;
  double y;
  int ib;
  int k;
  accumulatedData = x[0];
  for (k = 0; k < 1023; k++) {
    accumulatedData += x[k + 1];
  }
  for (ib = 0; ib < 99; ib++) {
    int xblockoffset;
    xblockoffset = (ib + 1) << 10;
    y = x[xblockoffset];
    for (k = 0; k < 1023; k++) {
      y += x[(xblockoffset + k) + 1];
    }
    accumulatedData += y;
  }
  return accumulatedData / 102400.0;
}

/*
 * File trailer for mean.c
 *
 * [EOF]
 */
